package cn.clwxy.gdz.service;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;

import cn.clwxy.gdz.bo.IndexStudentListBean;
import cn.clwxy.gdz.util.BaseDao;

public class IndexStudentListBeanServiceImpl extends BaseDao implements IndexStudentListBeanService {

	@Override
	public List<IndexStudentListBean> getIndexStudents() {
		String sql="SELECT s.studentId,studentName,studentSex,g.gradeName,i.src,sj.subjectName FROM `student` s INNER JOIN grade g ON studentGradeId=g.id INNER JOIN imgid i on i.id=studentImgId INNER JOIN studentsubjectrrelative ss ON s.studentId=ss.studentId INNER JOIN `subject` sj on sj.subjectId=ss.subjectId GROUP BY s.studentId ORDER BY studentDate DESC LIMIT 0,10";
		return super.queryList(sql, new BeanListHandler<IndexStudentListBean>(IndexStudentListBean.class));
	}

}
